#pragma once
#include <Windows.h>
#include <windowsx.h>
#include <time.h>
#include <conio.h>
#include <stdio.h>
#include "V2D.h"

// global declarations
#define WINDOW_TITLE L"Engine"
#define MAX_MOUSEBUT 8
#define MAX_KEYS 200

// Toggle Fullscreen/Windowed Mode
/**
#define FULLSCREEN_MODE
/**/

// Enable Debug Console
/**/
#define MYAPP_DEBUG_TRACE
/**/

#ifndef FULLSCREEN_MODE
// Enable Borderless Window
/**/
#define BORDERLESS_WINDOW
/**/
#endif

//=======================================================================
/**                     WINDOW SCREEN SETUP                             */
#ifndef FULLSCREEN_MODE
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 600
#endif
#ifdef FULLSCREEN_MODE
/** Get horizontal FULLscreen size in pixels */
static int GetDesktopResolutionWidth()
{	
	// bounds for desktop
	RECT desktop;
	// Get a handle to the desktop window
	const HWND hDesktop = GetDesktopWindow();
	// Get the size of screen to the variable desktop
	GetWindowRect(hDesktop, &desktop);
	// return height
	return desktop.right;
}
/** Get vertical FULLscreen size in pixels */
static int GetDesktopResolutionHeight()
{
	// bounds for desktop
	RECT desktop;
	// Get a handle to the desktop window
	const HWND hDesktop = GetDesktopWindow();
	// Get the size of screen to the variable desktop
	GetWindowRect(hDesktop, &desktop);
	// return height
	return desktop.bottom;
}
static int d_width = GetDesktopResolutionWidth();
static int d_height = GetDesktopResolutionHeight();
// Set Max Desktop Height and Width at Fullscreen
#define SCREEN_WIDTH d_width
#define SCREEN_HEIGHT d_height
#endif

//====================================================================
/**							DEBUG TRACE								*/
/* Debug printf Enabled */
#ifdef  MYAPP_DEBUG_TRACE
#define DbgPrintf printf
#else
/* Debug printf Disabled */
#define DbgPrintf
#endif